<script lang="ts" setup>
  import { Gtable } from '../../component';
  import { ref, reactive, onMounted } from 'vue';
  import { useRoute } from 'vue-router';
  import type { GTableConfig } from '../../utils/declar';

  const tableConfig = ref<GTableConfig>();

  // 组件挂载时获取布局
  onMounted(() => {
    const route = useRoute();
    tableConfig.value = JSON.parse(route.meta.config);
    console.log("route",tableConfig.value)
  });
</script>

<template>
  <Gtable v-if="tableConfig" :config="tableConfig" :key="tableConfig"/>
</template>
